﻿--JMacroHandlers["术"]={JMacroWarlockHanlder}
JMacroHandlers["职"]={JMacroClassesHanlder}
JMacroHandlers["食"]={JMacroFoodHanlder}
JMacroHandlers["队"]={JMacroPartyHandler}


--JMacroHandlers["探"]={JMacroTracHandler}
--[[
牧师：PRIEST 
盗贼：ROGUE 
德鲁伊：DRUID 
猎人：HUNTER 
圣骑士：PALADIN 
法师：MAGE 
撒满：SHAMAN 
术士：WARLOCK 
战士：WORRIOR 
]]--
JMacroConfig={
--[[
["职业"]={
		--分组，每组内的buff只能同时存在一个
		{{spell name 1, buff name 1},{spell name2 ,buff name2}}，
		{{spell name 1, buff name 1},{spell name2 ,buff name2}}，
		
		["buff"]={--这里是buff，非战斗状态
--如果魔法小于40%施法蝰蛇守护
            {function() return UnitManaPercent("player")<0.4 end,"蝰蛇守护",},
--如果魔法大于80%，施放"雄鹰守护",alt "猎豹守护", shift "灵猴守护"
            {function() return UnitManaPercent("player")>0.8 end,"雄鹰守护","猎豹守护","灵猴守护",}
        },
        ["check"]={--非战斗状态
--如果等级大于12应该有pet，pet已挂，施放复活宠物
            {function() return UnitLevel('player')>12 and UnitIsDead('pet') end,"复活宠物"},
--等级大于12，pet不存在，召唤宠物，，alt键复活宠物
            {function() return UnitLevel('player')>12 and not UnitExists('pet') end,"召唤宠物","复活宠物"},
--有宠物，宠物不高兴，施放喂养宠物
            {function() return UnitExists('pet') and (GetPetHappiness() or 1)<3 end,"喂养宠物"},
--有宠物，宠物血小于60%，施放治疗宠物
            {function() return UnitExists('pet') and UnitHealthPercent("pet")<0.6 end,"治疗宠物",},
        },
        ["help"]={
           
        },
--战斗状态施法顺序
        ["sequence"]={"猎人印记","毒蛇钉刺","奥术射击","瞄准射击","奥术射击","瞄准射击"}
    },
	
]]--
	["DISPEL"]={
		--解毒技能（非战斗状态解毒
		["CURSE"]={},
		["DISEASE"]={},
		["MAGIC"]={},
		["POISON"]={"消毒术"}
	},
	["ITEM"]={
		{function(target) return HasDebuff(target,"Poison") end,"抗毒药剂"},
	},
	["HUNTER"]={
		--生命小于40%或法力小于0.25吃食物，魔法大于0.1施法help法术
		["eat"]={0.4,0.2},
		["buff"]={
			{function() return UnitManaPercent("player")<0.4 end,"蝰蛇守护",},
			{function() return UnitManaPercent("player")>0.8 end,"雄鹰守护","猎豹守护","灵猴守护",}
		},
		["check"]={
			{function() return UnitLevel('player')>12 and UnitIsDead('pet') end,"复活宠物"},
			{function() return UnitLevel('player')>12 and not UnitExists('pet') end,"召唤宠物","复活宠物"},
			{function() return UnitExists('pet') and (GetPetHappiness() or 1)<3 end,"喂养宠物"},
			{function() return UnitExists('pet') and UnitHealthPercent("pet")<0.6 end,"治疗宠物",},
		},
		["help"]={
			
		},
		["sequence"]={"猎人印记","毒蛇钉刺","奥术射击","瞄准射击","奥术射击","瞄准射击"}
	},
	["DRUID"]={
		--，魔法大于0.1施法help法术
		["eat"]={0.01,0.3},
		["buff"]={
			{function() return IsSwimming() end,"水栖形态"},
		},
		["check"]={
			
		},
		["help"]={
			--友方目标施法
			{function(target) return HasDebuff(target,"Poison") end,"消毒术"},
			{function(target) return HasDebuff(target,"Curse") end,"解除诅咒"},
			{function(target) return UnitHealthPercent(target)<0.6 end,"愈合"},
			{function(target) return UnitHealthPercent(target)<0.6 end,"治疗之触"},
			{function() return true end,"野性印记",},
			{function() return true end,"荆棘术",},
			{function(target) return UnitHealthPercent(target)<0.8 end,"回春术"},
			
		},
		["dead"]={
			--友方目标死亡
			{function(target) return true end,"起死回生"},
		},
		["sequence"]={"[combat] reset=12 ","纠缠根须","愈合","治疗之触"}
	},
	["WARLOCK"]={
		["eat"]={0.01,0.3},
		["buff"]={
		
		},
		["check"]={
			{function() return not HasItem('法力刚玉') end,"制造法力宝石",},
		},
		["help"]={
			--友方目标施法
			{function(target) return true end,"奥术智慧",},
			{function(target) return true end,"霜甲术",},
			{function(target) return true end,"魔法意志"},
			
		},
		["dead"]={
			
		},
		["sequence"]={"[combat] reset=12 ","xxx"}
	},
	["PRIEST"]={
		["eat"]={0.01,0.3},
		["buff"]={
		
		},
		["check"]={
			{function() return not HasItem('法力刚玉') end,"制造法力宝石",},
		},
		["help"]={
			--友方目标施法
			{function(target) return true end,"奥术智慧",},
			{function(target) return true end,"霜甲术",},
			{function(target) return true end,"魔法意志"},
			
		},
		["dead"]={
			
		},
		["sequence"]={"[combat] reset=12 ","xxx"}
	},
	["ROGUE"]={
		["eat"]={0.01,0.3},
		["buff"]={
		
		},
		["check"]={
			{function() return not HasItem('法力刚玉') end,"制造法力宝石",},
		},
		["help"]={
			--友方目标施法
			{function(target) return true end,"奥术智慧",},
			{function(target) return true end,"霜甲术",},
			{function(target) return true end,"魔法意志"},
			
		},
		["dead"]={
			
		},
		["sequence"]={"[combat] reset=12 ","xxx"}
	},
	["PALADIN"]={
		["eat"]={0.01,0.3},
		["buff"]={
			{function(target) return true end,"虔诚光环",},
			{function(target) return true end,"正义圣印",},
		},
		["check"]={
			{function() return not HasItem('法力刚玉') end,"制造法力宝石",},
		},
		["help"]={
			--友方目标施法
			{function(target) return true end,"力量祝福",},
			{function(target) return true end,"霜甲术",},
			{function(target) return true end,"魔法意志"},
			
		},
		["dead"]={
			
		},
		["sequence"]={"[combat] reset=12 ","xxx"}
	},
	["MAGE"]={
		["eat"]={0.01,0.3},
		["buff"]={
		
		},
		["check"]={
			{function() return not HasItem('法力刚玉') end,"制造法力宝石",},
		},
		["help"]={
			--友方目标施法
			{function(target) return true end,"奥术智慧",},
			{function(target) return true end,"霜甲术",},
			{function(target) return true end,"魔法意志"},
			
		},
		["dead"]={
			
		},
		["sequence"]={"[combat] reset=12 ","xxx"}
	},
	["SHAMAN"]={
		
	},
	["WORRIOR"]={
		
	},
}

JMacroPartyMembers={"天涯路","天涯二路","天涯三鹿","天涯四路","天涯五路"}
JMacroPartyMacros={
	["reload"]={"/console reloadui"},
	["治疗#m#"]={"/施放 [target=#m#,dead]救赎;[target=#m#,mod:alt]圣疗术;[target=#m#]圣光术"},
	["智慧祝福"]={"/施放 [target=party1target]智慧祝福"},
	["力量祝福"]={"/施放 [target=party1target]力量祝福"},
	["王者祝福"]={"/施放 [target=party1target]王者祝福"},
	["跟随"]={"/跟随 party1"},
	["跟随2"]={"/跟随 #m2#"},
	["保护"]={"/施放 [target=party1target,help][target=party1]保护之手"},
	["协助"]={"/协助 party1\n/startattack\n/跟随 party1\n/施放 驱邪术\n/施放 愤怒之锤","/targetNeareastEnemy\n/startattack\n/施放 驱邪术\n/施放 愤怒之锤"},
	["邀请"]={"/邀请 #m1#\n/邀请 #m2#\n/邀请 #m3#\n/邀请 #m4#\n/邀请 #m5#\n"}
}